<%@ page import="day03.Emp" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.HashMap" %>
<%@ page import="java.util.List" %>
<%@ page import="java.util.Map" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
    <head>
        <title>Title</title>
        <%
            pageContext.setAttribute("message","pageContext Hello");
            request.setAttribute("message","request Hello");
            session.setAttribute("message","session Hello");
            application.setAttribute("message","application Hello");

            Emp emp=new Emp();
            emp.setName("abc");
            emp.setHobbies(new String[]{"1","3"});

            request.setAttribute("emp",emp);


            Map map=new HashMap();
            map.put("aaa","111");
            map.put("bbb","222");
            map.put("ccc","333");

            request.setAttribute("map",map);

            List list=new ArrayList();
            list.add("aaa");
            list.add("bbb");
            list.add("ccc");

            request.setAttribute("list",list);

        %>
    </head>
    <body>
        <%--<%=request.getAttribute("message")%>--%>
        <%--<%--%>
            <%--String message= (String) request.getAttribute("message");--%>
            <%--if(message!=null){--%>
                <%--out.print(message);--%>
            <%--}--%>
        <%--%>--%>

        ${pageScope.message}<br/>
        ${requestScope.message}<br/>
        ${sessionScope.message}<br/>
        ${applicationScope.message}<br/>

        ${message}<br/>

        ${emp.name}<br/>
        ${emp["name"]}<br/>
        ${emp.hob}<br/>
        ${pageContext.request.contextPath}<br/>

        ${map.bbb}<br/>
        ${map["bbb"]}<br/>

        ${list[1]}<br/>

        ${emp.name.toUpperCase()}<br/>
        ${list.get(2)}<br/>

        ${1+1}<br/>
        ${1==2}<br/>
        ${1>5?"aaa":"bbb"}<br/>
        ${"aaa".equals("bbb")}<br/>
        ${"aaa" eq "bbb"}<br/>
        ${empty user}<br/>


        ${param.username}<br/>
        ${param["username"]}<br/>

        ${header["User-Agent"]}<br/>

        ${cookie.username}<br/>
        ${cookie.username.name}<br/>
        ${cookie.username.value}<br/>
    </body>
</html>
